package com.vero.system.api;

import com.vero.common.core.constant.SecurityConstants;
import com.vero.common.core.constant.ServiceNameConstants;
import com.vero.common.core.domain.R;
import com.vero.common.core.web.domain.AjaxResult;
import com.vero.system.api.domain.SysUser;
import com.vero.system.api.domain.Vaccine;
import com.vero.system.api.factory.RemoteUserFallbackFactory;
import com.vero.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 库存服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "remoteInventoryService", value = "inventory-service")
public interface RemoteInventoryService
{
    /**
     * 通过用户名查询用户信息
     *
     * @param username 用户名
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/user/info/{username}")
    public R<LoginUser> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PutMapping("/vaccine/updateVaccineStock")
    public AjaxResult updateVaccineStock(@RequestBody Vaccine vaccine);
}
